<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

</head>
<body>
    <div id="app">
        <!--
           v-on:click 绑定点击事件  缩写模式： @click
           v-on:change ,v-on:keydown
       -->
        <input v-on:click="isShow" type="button" value="按这个">
        <input @click="isShow" type="button" value="按这个">

        <img v-show="flag" src="img/10679.jpg">

        <input type="text" @keydown="isDown">
    </div>
</body>
<script>
    new Vue({
        el:"#app",
        data:{
            flag:true
        },
        methods:{
            isShow(){
                this.flag = !this.flag;
            },
            isDown(event){
                if (event.keyCode>=65 && event.keyCode<=90) 
                console.log(event.key);
            }
        }
    });
</script>
</html>